package com.yunfangdata.web.controller;


import com.yunfangdata.query.QueryObject;
import com.yunfangdata.service.ISystemLogService;
import com.yunfangdata.util.PageResult;
import com.yunfangdata.util.PermissionName;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("systemLog")
public class SystemLogController {

    @Autowired
    private ISystemLogService systemLogService;

    @RequiresPermissions("systemLog:index")
    @PermissionName("日志首页")
    @RequestMapping("")
    public String index(){
        return "systemLog/list";
    }

    @RequiresPermissions("systemLog:list")
    @PermissionName("日志列表")
    @RequestMapping("list")
    @ResponseBody
    public PageResult list(QueryObject qo){
        PageResult query = systemLogService.query(qo);
        return query;
    }

}
